package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.Hanlan;
import com.example.demo.entity.Zong;
import com.example.demo.mapper.HanlanMapper;
import com.example.demo.mapper.ZongMapper;
import com.example.demo.service.ZongService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (Zong)表服务实现类
 *
 * @author makejava
 * @since 2023-11-19 18:47:53
 */
@Service("zongService")
public class ZongServiceImpl extends ServiceImpl<ZongMapper, Zong> implements ZongService {
    @Autowired
    private ZongMapper zongMapperr;

    public List<Zong> selectAll() {
        return zongMapperr.selectList(null);
    }

    public List<Zong> getById(int id) {
        QueryWrapper<Zong> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id", id);
        return zongMapperr.selectList(queryWrapper);
    }
}
